/*
 * @Description: 工程月报
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2023-04-21 14:37:27
 * @LastEditTime: 2023-04-26 15:01:49
 * @FilePath: \cscec-pms-admin\src\api\project\projectMonthlyReport.js
 */
import request from '@/utils/request2'
import request1 from '@/utils/request'
import { producerApisUrl } from '@/api/config'

const api = {
  list:{
    getPageProjectReport: producerApisUrl + '/projectReport/getPageProjectReport',
    exportWord: producerApisUrl + '/projectReport/exportWord'
  },
  view: {
    getOneTable: producerApisUrl + '/projectReport/getOneTable',
    getTwoTable: producerApisUrl + '/projectReport/getTwoTable',
    getThreeTable: producerApisUrl + '/projectReport/getThreeTable',
    getFourTable: producerApisUrl + '/projectReport/getFourTable',
    getFiveTable: producerApisUrl + '/projectReport/getFiveTable',
    getSixTable: producerApisUrl + '/projectReport/getSixTable',
    getSevenTable: producerApisUrl + '/projectReport/getSevenTable',
    getEightTable: producerApisUrl + '/projectReport/getEightTable',
    getNineTable: producerApisUrl + '/projectReport/getNineTable'
  }
}
// 列表接口
const list = {
  /**
   * @description: 获取工程月报列表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getPageProjectReport: data => {
    return request({
      url: api.list.getPageProjectReport,
      method: 'post',
      data
    })
  },
  /**
   * @description: 工程月报导出
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  exportWord: data => {
    return request1({
      url: `${api.list.exportWord}/${data}`,
      method: 'get',
      responseType: 'blob'
    })
  }
}
// 详情页接口
const view = {
  /**
   * @description: 获取各分公司生产运营情况
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getOneTable: data => {
    return request({
      url: `${api.view.getOneTable}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取风险及重点监控项目清单及分析
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getTwoTable: data => {
    return request({
      url: `${api.view.getTwoTable}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取策划执行及履职情况
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getThreeTable: data => {
    return request({
      url: `${api.view.getThreeTable}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取项目经理积分情况
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getFourTable: data => {
    return request({
      url: `${api.view.getFourTable}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取其他情况
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getFiveTable: data => {
    return request({
      url: `${api.view.getFiveTable}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取下月重点工作
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getSixTable: data => {
    return request({
      url: `${api.view.getSixTable}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取附表1
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getSevenTable: data => {
    return request({
      url: `${api.view.getSevenTable}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取附表2
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getEightTable: data => {
    return request({
      url: `${api.view.getEightTable}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取附表3
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  getNineTable: data => {
    return request({
      url: `${api.view.getNineTable}/${data}`,
      method: 'get'
    })
  }
}

export{
  list,
  view
}
